# coding=utf-8
from __future__ import unicode_literals

from django.db import models
from django.contrib import admin


class BlogPost(models.Model):
    title = models.CharField(verbose_name='标题', max_length=48)
    body = models.TextField()
    timestamp = models.DateTimeField(verbose_name='更新时间')

    class Meta(object):
        ordering = ('-timestamp',)


class BlogPostAdmin(admin.ModelAdmin):
    list_display = ("title", "timestamp")


admin.site.register(BlogPost, BlogPostAdmin)
